<?php

namespace app\api\controller;

use app\common\controller\Api;
use think\Db;
use think\Validate;
use \app\common\model\DiagnosticReport as DiagnosticReportModel;

/**
 * 诊断报告接口
 */
class Diagnosticreport extends Api
{
    /**
     * 诊断报告列表
     * @var array
     */
    protected $noNeedRight = '*';
    public function _initialize()
    {
        parent::_initialize();
        $this->model = new DiagnosticReportModel();
    }

    public function diagnosticIndex()
    {
        $data = input('get.');
        $student_id = $data['student_id'];
        $params = [
            'student_id' => $student_id,
        ];
        $list = $this->model->where($params)->order('id desc')->select();
        $this->success('获取成功', $list);
    }

    public function diagnosticDetail()
    {
        $data = input('get.');
        $student_id = $data['id'];
        $params = [
            'id' => $student_id,
        ];
        $list = $this->model->where($params)->select();
        $this->success('获取成功', $list);
    }
 

    
}
